package com.example.productdataserviceprovider.dao;

import com.example.productdataserviceprovider.dao.entity.Product;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface ProductRepository extends JpaRepository<Product,Long> {
    @Query("select c from Product c where c.name  like :name ")
    Page<Product> findProduct(@Param("name") String name, Pageable pageable);
}
